<template>
    <div>
        <input type="text" v-model="name">
        <button @click="btn">登陆</button>
    </div>
</template>

<script>
import axios from 'axios'
export default {
    data () {
        return {
            name:''
        }
    },
    methods: {
        btn(){
            axios.get('http://127.0.0.1:8000/user/login2/',{name:this.name}).then((res)=>{
                alert(res.data.msg)
                if(res.data.code==200){
                    this.$router.push('bossshow')
                }
            })
        }
    }
}
</script>

<style>

</style>